package com.sss.hloster0206;

public class Student {
	private String Name;// 姓名
	private int Number;// 学号
	private float Score;// 成绩

	public Student(String name, int number, float score) {
		super();
		Name = name;
		Number = number;
		Score = score;
	}

	public Student(float score) {
		super();
		Score = score;

	}

	public void showAll() {
		System.out.println("姓名为：" + Name + "   学号为：" + Number + "  成绩为：" + Score);
	}

	public String getName() {
		return Name;
	}

	public void setName(String name) {
		Name = name;
	}

	public int getNumber() {
		return Number;
	}

	public void setNumber(int number) {
		Number = number;
	}

	public float getScore() {
		return Score;
	}

	public void setScore(float score) {
		Score = score;
	}

	public static void sorting(Student[] stus) {
		Student temp;
		for (int i = 0; i < stus.length - 1; i++) {
			for (int j = 0; j < stus.length - i - 1; j++) {
				if (stus[j].Score < stus[j + 1].Score) {
					temp = stus[j];
					stus[j] = stus[j + 1];
					stus[j + 1] = temp;
				}
			}
		}
	}

}
